package proxy;

import java.lang.reflect.Method;

import teamsea.Car;

public class CarProxy {

    public void run() throws Exception {

        Class<Car> clazz = Car.class;

        Method method = clazz.getMethod("run", null);

        System.out.println("打火");

        method.invoke(clazz.newInstance(), null);


        System.out.println("刹车");

    }

}
